﻿<UserControl x:Class="PrismFactory.SoftwareFactory.Views.CreateSolution.EnsurePrismAssembliesPageView" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" Height="499" Width="803" Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <Style x:Key="textBoxInError" TargetType="{x:Type TextBox}">
            <Style.Triggers>
                <Trigger Property="Validation.HasError" Value="true">
                    <Setter Property="ToolTip" Value="{Binding (Validation.Errors)[0].ErrorContent, RelativeSource={x:Static RelativeSource.Self}}" />
                </Trigger>
            </Style.Triggers>
        </Style>
        <DataTemplate x:Key="AssembliesDataTemplate">
            <StackPanel>
                <TextBlock x:Name="nameText" Text="{Binding Name, Mode=TwoWay}" />
            </StackPanel>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding Exists, Mode=TwoWay}" Value="False">
                    <Setter TargetName="nameText" Property="Foreground" Value="Red"/>
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>
    </UserControl.Resources>
        <Canvas RenderTransformOrigin="0.507,0.463" Canvas.Left="34" Canvas.Top="39">
            <Label Content="Path of required Prism assemblies (WPF):" Width="300" Height="25" HorizontalAlignment="Left" Canvas.Left="12" Canvas.Top="12" />
            <TextBox x:Name="prismAssembliesPathDesktopTextBox" Width="366" IsReadOnly="False" Height="25" VerticalAlignment="Top" HorizontalAlignment="Left" Text="{Binding PrismAssembliesPathWpf, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" Style="{StaticResource textBoxInError}" Canvas.Top="41" Canvas.Left="12" />
            <Button Content="..." Width="32" Height="25" Click="OnPrismAssembliesForDesktopButtonClick" Canvas.Left="382" Canvas.Top="41" d:LayoutOverrides="Height" />
            <ListBox ToolTip="Required Prism assemblies for Desktop" ItemsSource="{Binding PrismAssembliesWpf}" Height="113" Canvas.Top="70" Width="402" d:LayoutOverrides="VerticalAlignment" Canvas.Left="12" ItemTemplate="{DynamicResource AssembliesDataTemplate}" />
            <Label Content="Path of required Prism assemblies (Silverlight):" Width="300" Height="25" HorizontalAlignment="Left" Canvas.Left="12" Canvas.Top="192" />
            <TextBox x:Name="prismAssembliesPathSilverlightTextBox" Width="366" IsReadOnly="False" Height="25" VerticalAlignment="Top" HorizontalAlignment="Left" Text="{Binding PrismAssembliesPathSilverlight, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" Style="{StaticResource textBoxInError}" Canvas.Top="221" Canvas.Left="12" />
            <Button Content="..." Width="32" Height="25" Click="OnPrismAssembliesForSilverlightButtonClick" Canvas.Left="382" Canvas.Top="221" d:LayoutOverrides="Height" />
            <ListBox ToolTip="Required Prism assemblies for Silverlight" ItemsSource="{Binding PrismAssembliesSilverlight}" Height="113" Canvas.Top="250" Width="402" Canvas.Left="12" ItemTemplate="{DynamicResource AssembliesDataTemplate}" d:LayoutOverrides="VerticalAlignment" />
        </Canvas>
</UserControl>